DevJourney

Python/VIT/sem-1/ex-07/2. Fibonacci/for.py

n=int(input("Enter number of fibonacci numbers to print: "))

i=-1
j=1

for k in range(n):
    s=i+j
    i=j
    j=s
    print(s,end=' ')

View on GitHub